 // 基于准备好的dom，初始化echarts实例
 var myChart3 = echarts.init(document.getElementById("left-bottom"),'dark');
 // 指定图表的配置项和数据

 var returnData = {
    day: [],
    confirm: [],
    suspect: [],
    cured: [],
    death: [],
 }
 $.ajax({
     url: '/data_hubei',
     method: 'GET',
     dataType: 'json',
     success: function (data) {
        returnData.day = data.day;
        returnData.confirm = data.confirm;
        returnData.suspect = data.suspect;
        returnData.cured = data.cured;
        returnData.death = data.death;
         var option = {
             title: {
                 text: '11⽉份湖北省疫情情况',
                 subtext: '数据截⽌⽇期：2020-11',
                 left: 'center'
             },
             tooltip: {
                 trigger: 'axis'
             },
             legend: {
                 show: false
             },
             grid: {
                 left: '3%',
                 right: '4%',
                 bottom: '3%',
                 containLabel: true
             },
             toolbox: {
                 feature: {
                     saveAsImage: {}
                 }
             },
             xAxis: {
                 type: 'category',
                 boundaryGap: false,
                 data: returnData.day
             },
             yAxis: {
                 type: 'value'
             },
             series: [{
                     name: '确诊人数',
                     type: 'line',
                     data: returnData.confirm
                 },
                 {
                     name: '感染人数',
                     type: 'line',
                     data: returnData.suspect
                 },
                 {
                     name: '治愈人数',
                     type: 'line',
                     data: returnData.cured
                 },
                 {
                     name: '死亡人数',
                     type: 'line',
                     data: returnData.death
                 }
             ]
         };

         // 使用刚指定的配置项和数据显示图表。
         myChart3.setOption(option);
     },
     error: function (msg) {
         console.log(msg)
     }
 });